﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace eTerm.MsSql.DbProvider
{
    [Flags]
    public enum DetrStatus : int
    {
        [Description(@"待处理")]
        [QueryAttribute()]
        PENDDING = 1,   //待处理


        [QueryAttribute()]
        [Description(@"未使用")]
        OPENFORUSE = 2,     //无OPEN FOR USE 航段

        NOTEXIST = 4,    //票号已被退票

        [Description(@"已完成")]
        COMPLETED = 8,

        [Description(@"已退票")]
        REFUND = 16,

        [Description(@"已使用")]
        [QueryAttribute()]
        USED = 32,

        [Description(@"未审核")]   //未与第三系统已匹配
        BEFORECOMPARE = 64,

        [QueryAttribute()]
        [Description(@"异常退票")] //与第三系统匹配失败(状态不一致)
        COMPARERROR = 128,

        [QueryAttribute()]
        [Description(@"正常退票")]   //与第三系统已匹配
        AFTERCOMPARE = 256,

        [Description(@"已挂起")]
        SUSPENDED = 512,

        [Description(@"AIRPORT CNTL")]
        AIRPORTCNTL = 1024,

        [Description(@"已退票")]
        [Query()]
        ALLREFUND = NOTEXIST | REFUND | BEFORECOMPARE | AFTERCOMPARE,

        [Description(@"邮件通知状态")]
        EMAILSTATUS = NOTEXIST | REFUND | OPENFORUSE | SUSPENDED | AIRPORTCNTL,
    }


    [AttributeUsage(AttributeTargets.All)]
    public class QueryAttribute : Attribute { 
        
    }

}
